<template>
  <div class="ke">
    <div class="powertop">
      <router-link class="powertopli " to="/yongjinzhichu/zhichuguanli" v-if="checkquanxian('V0201').length > 0">支出订单管理</router-link>

      <router-link class="powertopli " to="/yongjinzhichu/yongjinbaimingdan" v-if="peizhi.second_commission_examine && checkquanxian('V0204').length > 0">支出审核</router-link>
      <router-link class="powertopli " to="/yongjinzhichu/yongjinzhichu" v-if="checkquanxian('V0202').length > 0">佣金支出</router-link>
      <!-- <router-link class="powertopli " to="/yongjinzhichu/zhichudakuanshenhe" v-if="peizhi.second_commission_examine && checkquanxian('V0204').length > 0">支出审核</router-link> -->
      <router-link class="powertopli " to="/yongjinzhichu/zhichudakuan" v-if="checkquanxian('V0203').length > 0">支出打款</router-link>
      <router-link class="powertopli" to="/yongjinzhichu/zhichupeizhi"  v-if="zhichupeizhi">支出配置</router-link>
      <router-link class="powertopli " to="/yongjinzhichu/yongjinzhichubaobiao" v-if="checkquanxian('V0205').length > 0">佣金支出报表</router-link>

      <router-link class="powertopli " to="/yongjinzhichu/caiwupeizhi">财务配置</router-link>
    </div>
  </div>
</template>

<script>
  import axios from 'axios'
  import top from '@/components/top.vue'
  import left from '@/components/left.vue'
  import foot from '@/components/foot.vue'
  import moment from "moment";
  import XLSX from 'xlsx';
  import {
      read,utils
    } from 'xlsx'

  export default {
    components: {
      "left": left,
      "top": top,
      "foot": foot
    },
    name: "ke",
    data() {
      return {
        peizhi:"",
        zhichupeizhi:false
      }
    },
    created() {
      this.getp()


    },
    mounted() {

    },
    methods: {
      getp:function(){
        if(JSON.parse(localStorage.getItem('USER')).id == JSON.parse(localStorage.getItem('SHOP')).shop_id){
          this.zhichupeizhi = true
        }

        if(localStorage.getItem('shopConfigInfo')){
          this.peizhi = JSON.parse(localStorage.getItem('shopConfigInfo'))
          this.$emit('huoqupeizhi',this.peizhi)
        }else{
          axios.get('/api/plan-market/expend/shopConfigInfo')
            .then(response => {
              if (response.data.msg.code == 0) {
                this.peizhi = response.data.data
                localStorage.setItem('shopConfigInfo',JSON.stringify(response.data.data))
                this.$emit('huoqupeizhi',this.peizhi)
              } else {
                this.$message.error(response.data.msg.info);
              }
          })
        }
      }

    }
  }
</script>

<style lang="scss" scoped>
  .ke {
    /deep/ .el-radio{ display: flex; align-items: center;}
    .powertop {
    	display: flex;
    	background:#f9f9f9;
    }
    .powertopli {
    	flex-basis: 180px;
    	line-height: 50px;
    	border-bottom: 3px #F9F9F9 solid;
    	color: #727272;
    	border-right: 1px #F9F9F9 solid;
    	font-size: 16px;
    	text-align: center;
    }
    .router-link-active {
    	background: #FFFFFF;
    	border-bottom: 3px #2974FF solid;
    }
    /deep/ .el-pagination.is-background .btn-prev:disabled{ background: rgba(246, 246, 246, 0.3); border: 1px rgba(167, 167, 167, 0.3) solid;}
    /deep/ .el-pagination.is-background .btn-next:disabled{ background: rgba(246, 246, 246, 0.3); border: 1px rgba(167, 167, 167, 0.3) solid;}
    /deep/ .el-pagination.is-background .btn-next{ background: rgba(246, 246, 246,1); border: 1px rgba(167, 167, 167,1) solid;}
    /deep/ .el-pagination.is-background .btn-prev{ background: rgba(246, 246, 246,1); border: 1px rgba(167, 167, 167,1) solid;}
    /deep/ .el-pagination.is-background .el-pager li:not(.disabled).active{ background-color: #2974FF;}
    /deep/ .el-pagination.is-background .el-pager li:not(.disabled).active:hover {
        color: #fff;
    }
    /deep/ .el-pagination.is-background .el-pager li:not(.disabled):hover {
        color: #2974FF;
    }
    /deep/ .el-pager li{ border-radius: 14px; background: rgba(255, 255, 255, 1); border: 1px rgba(167, 167, 167, 0.3) solid;}
    /deep/ .btn-prev{ border-radius: 14px; padding: 0 10px;}
    /deep/ .btn-next{ border-radius: 14px; padding: 0 10px;}

    /deep/ .el-table th{ background: rgb(246, 246, 246);}
    /deep/ .el-input__inner{ line-height: 36px; height: 36px; font-size: 12px; background: rgb(247, 248, 250);  border: 0;}
    /deep/ .el-date-editor .el-range-input{ background: rgb(247, 248, 250); }
    /deep/ .el-button{ padding: 11px 23px !important;}
    /deep/ .el-button--mini{ padding: 6px 15px !important;}
    /deep/ .el-button--danger {
        color: #FFF;
        background-color: #2974FF;
        border-color: #2974FF;
    }
    .team {
    	background: #F9F9F9;
    }
    /deep/ .baise .el-input__inner{ line-height: 36px; height: 36px; font-size: 12px; background: rgb(255,255,255);  border: 0;}
  }
</style>
